+2007-06-19 Johan Dahlin <jdahlin@async.com.br>
+
+ * gtk/*: Rename buildable methods to not clash with widget
+ methods. (#448928, Torsten Schoenfeld)
+
2007-06-19 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentmanager.c: Use g_timeout_add_seconds_full() for
GtkBuildableIface
gtk_buildable_set_name
gtk_buildable_get_name
-gtk_buildable_add
-gtk_buildable_set_property
+gtk_buildable_add_child
+gtk_buildable_set_buildable_property
gtk_buildable_construct_child
gtk_buildable_custom_tag_start
gtk_buildable_custom_tag_end
@Returns:
-<!-- ##### FUNCTION gtk_buildable_add ##### -->
+<!-- ##### FUNCTION gtk_buildable_add_child ##### -->
<para>
</para>
@type:
-<!-- ##### FUNCTION gtk_buildable_set_property ##### -->
+<!-- ##### FUNCTION gtk_buildable_set_buildable_property ##### -->
<para>
</para>
#if IN_HEADER(__GTK_BUILDABLE_H__)
#if IN_FILE(__GTK_BUILDABLE_C__)
-gtk_buildable_add
+gtk_buildable_add_child
gtk_buildable_construct_child
gtk_buildable_custom_tag_start
gtk_buildable_custom_tag_end
gtk_buildable_get_type G_GNUC_CONST
gtk_buildable_parser_finished
gtk_buildable_set_name
-gtk_buildable_set_property
+gtk_buildable_set_buildable_property
#endif
#endif
/* GtkBuildable */
static void gtk_action_group_buildable_init (GtkBuildableIface *iface);
-static void gtk_action_group_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type);
+static void gtk_action_group_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type);
static void gtk_action_group_buildable_set_name (GtkBuildable *buildable,
const gchar *name);
static const gchar* gtk_action_group_buildable_get_name (GtkBuildable *buildable);
static void
gtk_action_group_buildable_init (GtkBuildableIface *iface)
{
- iface->add = gtk_action_group_buildable_add;
+ iface->add_child = gtk_action_group_buildable_add_child;
iface->set_name = gtk_action_group_buildable_set_name;
iface->get_name = gtk_action_group_buildable_get_name;
}
static void
-gtk_action_group_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type)
+gtk_action_group_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type)
{
gtk_action_group_add_action (GTK_ACTION_GROUP (buildable),
GTK_ACTION (child));
}
/**
- * gtk_buildable_add:
+ * gtk_buildable_add_child:
* @buildable: a #GtkBuildable
* @builder: a #GtkBuilder
* @child: child to add
* Since: 2.12
**/
void
-gtk_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type)
+gtk_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type)
{
GtkBuildableIface *iface;
g_return_if_fail (GTK_IS_BUILDER (builder));
iface = GTK_BUILDABLE_GET_IFACE (buildable);
- g_return_if_fail (iface->add != NULL);
+ g_return_if_fail (iface->add_child != NULL);
- (* iface->add) (buildable, builder, child, type);
+ (* iface->add_child) (buildable, builder, child, type);
}
/**
- * gtk_buildable_set_property:
+ * gtk_buildable_set_buildable_property:
* @buildable: a #GtkBuildable
* @builder: a #GtkBuilder
* @name: name of property
* Since: 2.12
**/
void
-gtk_buildable_set_property (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *name,
- const GValue *value)
+gtk_buildable_set_buildable_property (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *name,
+ const GValue *value)
{
GtkBuildableIface *iface;
g_return_if_fail (value != NULL);
iface = GTK_BUILDABLE_GET_IFACE (buildable);
- if (iface->set_property)
- (* iface->set_property) (buildable, builder, name, value);
+ if (iface->set_buildable_property)
+ (* iface->set_buildable_property) (buildable, builder, name, value);
else
g_object_set_property (G_OBJECT (buildable), name, value);
}
GTypeInterface g_iface;
/* virtual table */
- void (* set_name) (GtkBuildable *buildable,
- const gchar *name);
- const gchar * (* get_name) (GtkBuildable *buildable);
- void (* add) (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type);
- void (* set_property) (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *name,
- const GValue *value);
- GObject * (* construct_child) (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *name);
- gboolean (* custom_tag_start) (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *tagname,
- GMarkupParser *parser,
- gpointer *data);
- void (* custom_tag_end) (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *tagname,
- gpointer *data);
- void (* custom_finished) (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *tagname,
- gpointer data);
- void (* parser_finished) (GtkBuildable *buildable,
- GtkBuilder *builder);
+ void (* set_name) (GtkBuildable *buildable,
+ const gchar *name);
+ const gchar * (* get_name) (GtkBuildable *buildable);
+ void (* add_child) (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type);
+ void (* set_buildable_property) (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *name,
+ const GValue *value);
+ GObject * (* construct_child) (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *name);
+ gboolean (* custom_tag_start) (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ GMarkupParser *parser,
+ gpointer *data);
+ void (* custom_tag_end) (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ gpointer *data);
+ void (* custom_finished) (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ gpointer data);
+ void (* parser_finished) (GtkBuildable *buildable,
+ GtkBuilder *builder);
- GObject * (* get_internal_child) (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *childname);
+ GObject * (* get_internal_child) (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *childname);
};
-GType gtk_buildable_get_type (void) G_GNUC_CONST;
+GType gtk_buildable_get_type (void) G_GNUC_CONST;
-void gtk_buildable_set_name (GtkBuildable *buildable,
- const gchar *name);
-const gchar * gtk_buildable_get_name (GtkBuildable *buildable);
-void gtk_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type);
-void gtk_buildable_set_property (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *name,
- const GValue *value);
-GObject * gtk_buildable_construct_child (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *name);
-gboolean gtk_buildable_custom_tag_start (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *tagname,
- GMarkupParser *parser,
- gpointer *data);
-void gtk_buildable_custom_tag_end (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *tagname,
- gpointer *data);
-void gtk_buildable_custom_finished (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *tagname,
- gpointer data);
-void gtk_buildable_parser_finished (GtkBuildable *buildable,
- GtkBuilder *builder);
-GObject * gtk_buildable_get_internal_child (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *childname);
+void gtk_buildable_set_name (GtkBuildable *buildable,
+ const gchar *name);
+const gchar * gtk_buildable_get_name (GtkBuildable *buildable);
+void gtk_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type);
+void gtk_buildable_set_buildable_property (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *name,
+ const GValue *value);
+GObject * gtk_buildable_construct_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *name);
+gboolean gtk_buildable_custom_tag_start (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ GMarkupParser *parser,
+ gpointer *data);
+void gtk_buildable_custom_tag_end (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ gpointer *data);
+void gtk_buildable_custom_finished (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ gpointer data);
+void gtk_buildable_parser_finished (GtkBuildable *buildable,
+ GtkBuilder *builder);
+GObject * gtk_buildable_get_internal_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *childname);
G_END_DECLS
{
buildable = GTK_BUILDABLE (obj);
iface = GTK_BUILDABLE_GET_IFACE (obj);
- if (iface->set_property)
+ if (iface->set_buildable_property)
custom_set_property = TRUE;
}
{
GParameter *param = &g_array_index (parameters, GParameter, i);
if (custom_set_property)
- iface->set_property (buildable, builder, param->name, ¶m->value);
+ iface->set_buildable_property (buildable, builder, param->name, ¶m->value);
else
g_object_set_property (obj, param->name, ¶m->value);
gtk_buildable_get_name (GTK_BUILDABLE (object)),
gtk_buildable_get_name (GTK_BUILDABLE (parent))));
- gtk_buildable_add (GTK_BUILDABLE (parent), builder, object,
- child_info->type);
+ gtk_buildable_add_child (GTK_BUILDABLE (parent), builder, object,
+ child_info->type);
child_info->added = TRUE;
}
}
void
-_gtk_cell_layout_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type)
+_gtk_cell_layout_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type)
{
GtkCellLayoutIface *iface;
GObject *child,
const gchar *tagname,
gpointer *data);
-void _gtk_cell_layout_buildable_add (GtkBuildable *buildable,
+void _gtk_cell_layout_buildable_add_child (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *type);
gtk_cell_view_buildable_init (GtkBuildableIface *iface)
{
parent_buildable_iface = g_type_interface_peek_parent (iface);
- iface->add = _gtk_cell_layout_buildable_add;
+ iface->add_child = _gtk_cell_layout_buildable_add_child;
iface->custom_tag_start = gtk_cell_view_buildable_custom_tag_start;
iface->custom_tag_end = gtk_cell_view_buildable_custom_tag_end;
}
gtk_combo_box_buildable_init (GtkBuildableIface *iface)
{
parent_buildable_iface = g_type_interface_peek_parent (iface);
- iface->add = _gtk_cell_layout_buildable_add;
+ iface->add_child = _gtk_cell_layout_buildable_add_child;
iface->custom_tag_start = gtk_combo_box_buildable_custom_tag_start;
iface->custom_tag_end = gtk_combo_box_buildable_custom_tag_end;
}
/* GtkBuildable */
static void gtk_container_buildable_init (GtkBuildableIface *iface);
-static void gtk_container_buildable_add (GtkBuildable *buildable,
+static void gtk_container_buildable_add_child (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *type);
gtk_container_buildable_init (GtkBuildableIface *iface)
{
parent_buildable_iface = g_type_interface_peek_parent (iface);
- iface->add = gtk_container_buildable_add;
+ iface->add_child = gtk_container_buildable_add_child;
iface->custom_tag_start = gtk_container_buildable_custom_tag_start;
iface->custom_tag_end = gtk_container_buildable_custom_tag_end;
}
static void
-gtk_container_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type)
+gtk_container_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type)
{
g_return_if_fail (GTK_IS_WIDGET (child));
static void
gtk_entry_completion_buildable_init (GtkBuildableIface *iface)
{
- iface->add = _gtk_cell_layout_buildable_add;
+ iface->add_child = _gtk_cell_layout_buildable_add_child;
iface->custom_tag_start = _gtk_cell_layout_buildable_custom_tag_start;
iface->custom_tag_end = _gtk_cell_layout_buildable_custom_tag_end;
}
/* GtkBuildable */
static void gtk_expander_buildable_init (GtkBuildableIface *iface);
-static void gtk_expander_buildable_add (GtkBuildable *buildable,
+static void gtk_expander_buildable_add_child (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *type);
}
static void
-gtk_expander_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type)
+gtk_expander_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type)
{
if (!type)
gtk_container_add (GTK_CONTAINER (buildable), GTK_WIDGET (child));
static void
gtk_expander_buildable_init (GtkBuildableIface *iface)
{
- iface->add = gtk_expander_buildable_add;
+ iface->add_child = gtk_expander_buildable_add_child;
}
static void
/* GtkBuildable */
static void gtk_frame_buildable_init (GtkBuildableIface *iface);
-static void gtk_frame_buildable_add (GtkBuildable *buildable,
+static void gtk_frame_buildable_add_child (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *type);
static void
gtk_frame_buildable_init (GtkBuildableIface *iface)
{
- iface->add = gtk_frame_buildable_add;
+ iface->add_child = gtk_frame_buildable_add_child;
}
static void
-gtk_frame_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type)
+gtk_frame_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type)
{
if (type && strcmp (type, "label") == 0)
gtk_frame_set_label_widget (GTK_FRAME (buildable), GTK_WIDGET (child));
gtk_icon_view_buildable_init (GtkBuildableIface *iface)
{
parent_buildable_iface = g_type_interface_peek_parent (iface);
- iface->add = _gtk_cell_layout_buildable_add;
+ iface->add_child = _gtk_cell_layout_buildable_add_child;
iface->custom_tag_start = gtk_icon_view_buildable_custom_tag_start;
iface->custom_tag_end = gtk_icon_view_buildable_custom_tag_end;
}
/* GtkBuildable */
static void gtk_notebook_buildable_init (GtkBuildableIface *iface);
-static void gtk_notebook_buildable_add (GtkBuildable *buildable,
+static void gtk_notebook_buildable_add_child (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *type);
static void
gtk_notebook_buildable_init (GtkBuildableIface *iface)
{
- iface->add = gtk_notebook_buildable_add;
+ iface->add_child = gtk_notebook_buildable_add_child;
}
static void
-gtk_notebook_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type)
+gtk_notebook_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type)
{
GtkNotebook *notebook = GTK_NOTEBOOK (buildable);
gint drop_position);
/* GtkBuildable */
-static void gtk_tree_view_buildable_add (GtkBuildable *tree_view,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type);
-static void gtk_tree_view_buildable_init (GtkBuildableIface *iface);
+static void gtk_tree_view_buildable_add_child (GtkBuildable *tree_view,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type);
+static void gtk_tree_view_buildable_init (GtkBuildableIface *iface);
static gboolean scroll_row_timeout (gpointer data);
static void
gtk_tree_view_buildable_init (GtkBuildableIface *iface)
{
- iface->add = gtk_tree_view_buildable_add;
+ iface->add_child = gtk_tree_view_buildable_add_child;
}
static void
\f
static void
-gtk_tree_view_buildable_add (GtkBuildable *tree_view,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type)
+gtk_tree_view_buildable_add_child (GtkBuildable *tree_view,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type)
{
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), GTK_TREE_VIEW_COLUMN (child));
}
static void
gtk_tree_view_column_buildable_init (GtkBuildableIface *iface)
{
- iface->add = _gtk_cell_layout_buildable_add;
+ iface->add_child = _gtk_cell_layout_buildable_add_child;
iface->custom_tag_start = _gtk_cell_layout_buildable_custom_tag_start;
iface->custom_tag_end = _gtk_cell_layout_buildable_custom_tag_end;
}
guint merge_id);
/* GtkBuildable */
-static void gtk_ui_manager_buildable_init (GtkBuildableIface *iface);
-static void gtk_ui_manager_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type);
+static void gtk_ui_manager_buildable_init (GtkBuildableIface *iface);
+static void gtk_ui_manager_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type);
static GObject* gtk_ui_manager_buildable_construct_child (GtkBuildable *buildable,
GtkBuilder *builder,
const gchar *name);
static void
gtk_ui_manager_buildable_init (GtkBuildableIface *iface)
{
- iface->add = gtk_ui_manager_buildable_add;
+ iface->add_child = gtk_ui_manager_buildable_add_child;
iface->construct_child = gtk_ui_manager_buildable_construct_child;
iface->custom_tag_start = gtk_ui_manager_buildable_custom_tag_start;
iface->custom_tag_end = gtk_ui_manager_buildable_custom_tag_end;
}
static void
-gtk_ui_manager_buildable_add (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *type)
+gtk_ui_manager_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type)
{
GtkUIManager *self = GTK_UI_MANAGER (buildable);
guint pos;
static void gtk_widget_buildable_set_name (GtkBuildable *buildable,
const gchar *name);
static const gchar * gtk_widget_buildable_get_name (GtkBuildable *buildable);
-static void gtk_widget_buildable_set_property (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *name,
- const GValue *value);
+static void gtk_widget_buildable_set_buildable_property (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *name,
+ const GValue *value);
static gboolean gtk_widget_buildable_custom_tag_start (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
iface->set_name = gtk_widget_buildable_set_name;
iface->get_name = gtk_widget_buildable_get_name;
- iface->set_property = gtk_widget_buildable_set_property;
+ iface->set_buildable_property = gtk_widget_buildable_set_buildable_property;
iface->parser_finished = gtk_widget_buildable_parser_finshed;
iface->custom_tag_start = gtk_widget_buildable_custom_tag_start;
iface->custom_finished = gtk_widget_buildable_custom_finshed;
}
static void
-gtk_widget_buildable_set_property (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *name,
- const GValue *value)
+gtk_widget_buildable_set_buildable_property (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *name,
+ const GValue *value)
{
if (strcmp (name, "has-default") == 0 && g_value_get_boolean (value))
g_object_set_qdata (G_OBJECT (buildable), quark_builder_has_default,
/* GtkBuildable */
static void gtk_window_buildable_interface_init (GtkBuildableIface *iface);
-static void gtk_window_buildable_set_property (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *name,
- const GValue *value);
+static void gtk_window_buildable_set_buildable_property (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *name,
+ const GValue *value);
static void gtk_window_buildable_parser_finished (GtkBuildable *buildable,
GtkBuilder *builder);
gtk_window_buildable_interface_init (GtkBuildableIface *iface)
{
parent_buildable_iface = g_type_interface_peek_parent (iface);
- iface->set_property = gtk_window_buildable_set_property;
+ iface->set_buildable_property = gtk_window_buildable_set_buildable_property;
iface->parser_finished = gtk_window_buildable_parser_finished;
}
static void
-gtk_window_buildable_set_property (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *name,
- const GValue *value)
+gtk_window_buildable_set_buildable_property (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *name,
+ const GValue *value)
{
GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (buildable);
if (strcmp (name, "visible") == 0 && g_value_get_boolean (value))
priv->builder_visible = TRUE;
else
- parent_buildable_iface->set_property (buildable, builder, name, value);
+ parent_buildable_iface->set_buildable_property (buildable, builder, name, value);
}
static void